import request from '@/utils/request';


// 分页查询-文章列表
export function findEssayList(query: any) {
    return request({
        url: '/app/find/essay',
        method: 'get',
        params: query,
    });
}

// 文章列表-新增
export function addEssay(data: any) {
    return request({
        url: '/app/find/add',
        method: 'post',
        data: data,
    });
}

// 获取文章树
export function getEssayTree() {
    return request({
        url: '/app/find/essay/tree',
        method: 'get',
    });

}
// 文章列表-删除
export function deleteEssay(essayid:any) {
    return request({
        url:'/app/find/'+ essayid,
        method:'delete',
    });
}

// 文章列表-修改
export function editEssay(data:any) {
    return request({
        url:'/app/find/edit',
        method:'put',
        data:data,
    });
}

// 文章列表-id查询
export function FindByIdEssay(id:any) {
    return request({
        url:'/app/find/essay/'+id,
        method:'get'
    });
}
